package com.landun.market.repository;

import com.landun.market.pojo.enums.StateCode;
import com.landun.market.pojo.model.Price;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

/**
 * Created by yi.zhao on 2018/5/19.
 */
@Repository
public interface IPriceRepository extends IBaseRepository<Price, Integer> {

    List<Price> findByCategoryDateAndState(@Param("categoryId") Integer categoryId, @Param("priceDate") Date priceDate,
                                           @Param("state") StateCode state);
    Integer deleteByDateAndState(@Param("priceDate") Date priceDate, @Param("state") StateCode state);
    Integer updateStateByDate(@Param("priceDate") Date priceDate, @Param("state") StateCode state);
}
